package com.pf.controller;

import com.pf.config.CustomProperties;
import com.pf.config.CustomUrlHelper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/custom/url")
public class CustomController {

    @Autowired
    private CustomUrlHelper customUrlHelper;

    @GetMapping("/get")
    public CustomProperties.UrlDTO getUrl(String key) {
        return customUrlHelper.getUrlDTO(key);
    }
}
